package com.dhu.stylefit.controller;

import com.dhu.stylefit.model.Recommendation;
import com.dhu.stylefit.service.RecommendationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/recommendations")
public class RecommendationController {

    @Autowired
    private RecommendationService recommendationService;

    @GetMapping("/{userId}")
    public ResponseEntity<Map<String, List<Recommendation>>> getRecommendations(@PathVariable Integer userId) {
        Map<String, List<Recommendation>> recommendations = recommendationService.getRecommendationsByUserId(userId);
        return ResponseEntity.ok(recommendations);
    }
} 